﻿using System.Net;

namespace Athena.RemoteAddress
{
    public class RemoteIpAddressModel : RemoteAddressModel
    {
        public RemoteIpAddressModel()
        {

        }

        public RemoteIpAddressModel(string ip, int port)
        {
            Ip = ip;
            Port = port;
        }

        public string Ip { get; set; }

        public int Port { get; set; }


        public override EndPoint CreateEndPoint()
        {
            return new IPEndPoint(IPAddress.Parse(Ip), Port);
        }

        public override string ToString()
        {
            return $"{Ip}:{Port}";
        }
    }
}
